import { Component, OnInit, Input } from '@angular/core';
import { DataService } from '../../services/data.service';

@Component({
  selector: 'app-audiotext',
  templateUrl: './audiotext.component.html',
  styleUrls: ['./audiotext.component.scss']
})
export class AudiotextComponent implements OnInit {
  @Input() current: number;
  public audiotexttype:boolean = false;
  public audioText:any;

  constructor(
    public data: DataService,
  ) { }

  ngOnInit() {
    this.audioText = this.data.content[this.current].audioAlert;
  }

  audiotype(a:number) {
    if(JSON.stringify(this.data.content[this.current].audioAlert)=="[]") return;
    this.audiotexttype = !this.audiotexttype
  }

}
